﻿using System;
using Sensors;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace StylusSensorTest
{
    public partial class StylusSensorTestForm : Form
    {
        public StylusSensorTestForm()
        {
            InitializeComponent();
            mySensor.StylusStateChanged += new StylusEventHandler(mySensor_StylusStateChanged);
            RefreshStylusState();
        }

        void RefreshStylusState()
        {
            myStylusStateLabel.Text = mySensor.StylusState.ToString();
        }

        void mySensor_StylusStateChanged(IStylusSensor sensor)
        {
            RefreshStylusState();
        }

        HTCStylusSensor mySensor = new HTCStylusSensor();

        private void myExitMenuItem_Click(object sender, EventArgs e)
        {
            Close();
        }
    }
}